package megrez.mail.sender.domain;

import java.util.List;
import java.util.Locale;
import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * 数据访问接口
 *  
 * @author Lucky Yang
 * @since 2.6.9
 */
public interface TemplateContentRepository extends JpaRepository<TemplateContent, String>, JpaSpecificationExecutor<TemplateContent>  {

    Optional<TemplateContent> findOneByTemplateConfigAndLocale(TemplateConfig template, Locale locale);

    List<TemplateContent> findByTemplateConfigAndLocale(TemplateConfig config, Locale locale);
    
}
